package com.kdgz.kdgz.controller;

import com.kdgz.kdgz.beans.Area;
import com.kdgz.kdgz.sevice.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Veneno
 * @Desc
 * @date 2021/3/23
 */
@RestController
public class AreaController {
    @Autowired
    AreaService areaService;

    @GetMapping("/areas")
    public List<Area> getAll() {
        return areaService.getAllArea();
    }

}
